<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
<script>
class Modal {
  constructor(sex) {
    this.sex = sex
    this.underwear
  }
  setUnderwear(underwear) {
    this.underwear = underwear
  }
  takePhoto() {
    console.log('sex=' + this.sex + ' underwear=' + this.underwear)
  }
}
let maleModal = new Modal('male'),
  femaleModal = new Modal('female')

for(let i = 1; i <= 50; i++) {
  maleModal.setUnderwear('underwear' + i)
  maleModal.takePhoto()
}
for(let i = 1; i <= 50; i++) {
  femaleModal.setUnderwear('underwear' + i)
  femaleModal.takePhoto()
}
</script>
</html>